﻿using System;
namespace CXedu.Model
{
	///<summary>
	///
	///</summary>
	public class Article : ModelBase<int>
	{
		#region 成员字段
		
		private int _cateid = default(Int32);
		private int _click = default(Int32);
		private string _content = String.Empty;
		private DateTime _inDate = DateTime.Now;
		///<summary>
		///发布时间查询区间值
		///</summary>
		private DateTime[] _inDatespan = null;
		private string _inUser = String.Empty;
		private string _keyWord = String.Empty;
		private string _pic = String.Empty;
		private string _summary = String.Empty;
		private string _title = String.Empty;
		private string _top = String.Empty;
		private DateTime? _upDate = null;
		///<summary>
		///更新时间查询区间值
		///</summary>
		private DateTime[] _upDatespan = null;
		private string _videoUrl = String.Empty;
		
		#endregion
		
		#region 构造方法
		
		public Article() { }
		
		#endregion
		
		#region 成员方法
		
		public override int GetHashCode()
		{
			System.Text.StringBuilder sb = new System.Text.StringBuilder();
			sb.Append(this.GetType().FullName);
			sb.Append(_cateid);
			sb.Append(_click);
			sb.Append(_content);
			sb.Append(_inDate);
			sb.Append(_inUser);
			sb.Append(_keyWord);
			sb.Append(_pic);
			sb.Append(_summary);
			sb.Append(_title);
			sb.Append(_top);
			sb.Append(_upDate);
			sb.Append(_videoUrl);
			return sb.ToString().GetHashCode();
		}
		
		#endregion
		
		#region 成员属性
		
		///<summary>
		///文章分类ID
		///</summary>
		public int Cateid
		{
			get
			{
				return _cateid;
			}
			set
			{
				_cateid = value;
			}
		}
		///<summary>
		///点击数
		///</summary>
		public int Click
		{
			get
			{
				return _click;
			}
			set
			{
				_click = value;
			}
		}
		///<summary>
		///内容
		///</summary>
		public string Content
		{
			get
			{
				return _content;
			}
			set
			{
				_content = value;
			}
		}
		///<summary>
		///发布时间
		///</summary>
		public DateTime InDate
		{
			get
			{
				return _inDate;
			}
			set
			{
				_inDate = value;
			}
		}
		///<summary>
		///发布时间查询区间值
		///</summary>
		public DateTime[] InDatespan{
			get
			{
				return _inDatespan;
			}
			set
			{
				_inDatespan = value;
			}
		}
		///<summary>
		///添加人
		///</summary>
		public string InUser
		{
			get
			{
				return _inUser;
			}
			set
			{
				_inUser = value;
			}
		}
		///<summary>
		///关键字
		///</summary>
		public string KeyWord
		{
			get
			{
				return _keyWord;
			}
			set
			{
				_keyWord = value;
			}
		}
		///<summary>
		///展示图片src
		///</summary>
		public string Pic
		{
			get
			{
				return _pic;
			}
			set
			{
				_pic = value;
			}
		}
		///<summary>
		///简介
		///</summary>
		public string Summary
		{
			get
			{
				return _summary;
			}
			set
			{
				_summary = value;
			}
		}
		///<summary>
		///标题
		///</summary>
		public string Title
		{
			get
			{
				return _title;
			}
			set
			{
				_title = value;
			}
		}
		///<summary>
		///置顶、推荐
		///</summary>
		public string Top
		{
			get
			{
				return _top;
			}
			set
			{
				_top = value;
			}
		}
		///<summary>
		///更新时间
		///</summary>
		public DateTime? UpDate
		{
			get
			{
				return _upDate;
			}
			set
			{
				_upDate = value;
			}
		}
		///<summary>
		///更新时间查询区间值
		///</summary>
		public DateTime[] UpDatespan{
			get
			{
				return _upDatespan;
			}
			set
			{
				_upDatespan = value;
			}
		}
		///<summary>
		///冗余视频地址
		///</summary>
		public string VideoUrl
		{
			get
			{
				return _videoUrl;
			}
			set
			{
				_videoUrl = value;
			}
		}
		
        /// <summary>
        /// 自定义查询条件
        /// </summary>
        public string CustomWhere { get; set; }
		
		#endregion
	}
		
	public static class ArticleHash
	{
		public const string TopNum = "TopNum";
		public const string OrderField = "OrderField";
		public const string OrderDirection = "OrderDirection";
		public const string Cateid = "Cateid";
		public const string Click = "Click";
		public const string Content = "Content";
		public const string Id = "Id";
		public const string InDate = "InDate";
		public const string InUser = "InUser";
		public const string KeyWord = "KeyWord";
		public const string Pic = "Pic";
		public const string Summary = "Summary";
		public const string Title = "Title";
		public const string Top = "Top";
		public const string UpDate = "UpDate";
		public const string VideoUrl = "VideoUrl";
		
        public const string CustomWhere = "CustomWhere";
	}
}